import request from "@/utils/request";

/**
 * 获取组织部门列表信息
 */
export const reqGetDepartments = () => {
    return request({
        methos: 'get',
        url: '/company/department'
    })
}

/**
 * 根据Id删除部门
 * @param {*} id 部门id
 */
export const reqDelDepartments = (id) => {
    return request({
        method: 'delete',
        url: `/company/department/${id}`
    })

}

/**
 * 新增部门
 */
export const reqAddDepartment = (form) => {
    return request({
        method: 'post',
        url: '/company/department',
        data: form
    })
}

/**
 * 根据Id查询部门详情
 */
export const reqGetDepartDetail = (id) => {
    return request({
        method: 'get',
        url: `/company/department/${id}`
    })
}

/**
 * 根据Id修改部门详情
 */
export const reqUpdateDepartDetail = (form) => {
    return request({
        method: 'put',
        url: `/company/department/${form.id}`,
        data: form
    })
}